﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class aspx_admin_communication_insert : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void fv审核_ItemCommand(object sender, FormViewCommandEventArgs e)
    {
        int id = int.Parse((this.fv审核.FindControl("留言IDLabel") as Label).Text);
        switch (e.CommandName)
        {
            case "OK":
               
                TextBox txt = fv审核.FindControl("txt回复") as TextBox;
                using (ds_名师讲堂TableAdapters.tb_交流互动TableAdapter da = new ds_名师讲堂TableAdapters.tb_交流互动TableAdapter())
                {
                    da.Update回复( string.IsNullOrEmpty( txt.Text)? "":txt.Text , true, DateTime.Now, id);
                }
                WebHelper.MessageBox.Show("通过审核成功！");
                break;
            case "Del":
               
                using (ds_名师讲堂TableAdapters.tb_交流互动TableAdapter da = new ds_名师讲堂TableAdapters.tb_交流互动TableAdapter())
                {
                    da.Delete(id);
                }
                WebHelper.MessageBox.Show("删除成功！");
                break;
            default:
                break;
        }
    }
}